# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kio-extras
pkgver=22.04.3
pkgrel=0
# armhf blocked by extra-cmake-modules
# s390x and riscv64 blocked by polkit -> kio
arch="all !armhf !s390x !riscv64"
url="https://www.kde.org/applications/internet/"
pkgdesc="Additional components to increase the functionality of KIO"
license="GPL-2.0-or-later (LGPL-2.1-only OR LGPL-3.0-only)"
depends="kinit"
makedepends="
	extra-cmake-modules
	gperf
	kactivities-dev
	karchive-dev
	kbookmarks-dev
	kconfig-dev
	kconfigwidgets-dev
	kcoreaddons-dev
	kdbusaddons-dev
	kdnssd-dev
	kdoctools-dev
	kdsoap-dev
	kguiaddons-dev
	khtml-dev
	ki18n-dev
	kiconthemes-dev
	kio-dev
	kpty-dev
	libmtp-dev
	libssh-dev
	nfs-utils-dev
	phonon-dev
	qt5-qtbase-dev
	qt5-qtsvg-dev
	samba-dev
	samurai
	shared-mime-info
	solid-dev
	syntax-highlighting-dev
	"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/release-service/$pkgver/src/kio-extras-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # Requires running dbus-server

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
8e6be2829743b4a44326335dfbfd655c7b52508ab7db566e0f5bec1a56a39ebd33a5d0438b7dc192ec3f0ebcde34ccff5e37d6b63d6bfd9f4ba5a5624616d732  kio-extras-22.04.3.tar.xz
"
